package com.czw.hibernate.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by czw on 2017/6/30 0030.
 */
@RestController
public class WebController {


    @RequestMapping(value = "/{page}", method = {RequestMethod.GET, RequestMethod.POST})
    public ModelAndView index(@PathVariable("page") String page) {
        return new ModelAndView("/"+page);
    }

}
